#!/usr/bin python3
# -*- coding:UTF-8 -*-
# Author: nigo
import time
from threading import Thread


def md2pdf(mdname, pdfname):
    time.sleep(5)
    print('%s转换完成' % mdname)


def work():
    for i in range(5):
        print(i)


if __name__ == '__main__':
    thread = Thread(target=md2pdf, args=('1.md', '1.pdf'))
    thread.start()
    thread.join() # 阻塞当前线程
    work()
